<ion-header>
    <ion-toolbar>
        <ion-title>
            <h1>{{ 'core.rating.ratings' | translate }}</h1>
        </ion-title>
        <ion-buttons slot="end">
            <ion-button fill="clear" (click)="closeModal()" [ariaLabel]="'core.close' | translate">
                <ion-icon slot="icon-only" name="fas-xmark" aria-hidden="true" />
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content>
    <core-loading [hideUntil]="loaded">
        <ion-list *ngIf="ratings.length > 0">
            <ion-item class="ion-text-wrap" *ngFor="let rating of ratings">
                <core-user-avatar [user]="rating" [courseId]="courseId" slot="start" />
                <ion-label>
                    <p class="item-heading">{{ rating.userfullname }}</p>
                    <p>{{ rating.rating }}</p>
                </ion-label>
                <ion-note slot="end" *ngIf="rating.timemodified">
                    {{ rating.timemodified | coreDateDayOrTime }}
                </ion-note>
            </ion-item>
        </ion-list>
        <core-empty-box *ngIf="ratings.length === 0" icon="fas-star-half-stroke" [message]="'core.rating.noratings' | translate" />
    </core-loading>
</ion-content>
